package com.gitee.wsl.mathematics.vector

import com.gitee.wsl.mathematics.vector.ext.inverse
import com.gitee.wsl.mathematics.vector.vec2.Vec2f
import com.gitee.wsl.mathematics.vector.vec3.Vec3f
import com.gitee.wsl.mathematics.vector.vec4.Vec4f
import kotlin.test.Test

class InverseTest {
    @Test
    fun vec2_inverse_newVec() = assertEquals(2f, 4f, Vec2f(0.5f, 0.25f).inverse())

    @Test
    fun vec3_inverse_newVec() = assertEquals(2f, 4f, 5f, Vec3f(0.5f, 0.25f, 0.2f).inverse())

    @Test
    fun vec4_inverse_newVec() = assertEquals(2f, 4f, 5f, 10f, Vec4f(0.5f, 0.25f, 0.2f, 0.1f).inverse())

}